<template>
  <div>
    <sprint-list v-if="!sprintId" :projectId="projectId" @getSprintId="getSprintId"></sprint-list>
    <sprint-overview v-else :sprintId="sprintId" :projectId="projectId" @getSprintId="getSprintId"></sprint-overview>
  </div>
</template>

<script>
import SprintList from "@/views/project/init/sprint/springList/index.vue";
import SprintOverview from "@/views/project/init/sprint/sprintOverview/index.vue";

export default {
  name: "Sprint",
  components: {SprintOverview, SprintList},
  data() {
    return {
      sprintId:null
    }
  },
  props: {
    projectId: {
      type: [Number],
    }
  },
  methods: {
    getSprintId(sprintId) {
      this.sprintId = sprintId
    }
  }
};
</script>
